package interfaces;

import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import entity.Operator;

import java.sql.Connection;
import java.util.List;

public interface OperatorDao {
    boolean insertOperator(Connection conn, Operator operator);

    boolean deleteOperator(Connection conn, int id);

    boolean updateOperator(Connection conn, int id, Operator operator) throws MySQLIntegrityConstraintViolationException;

    Operator selectById(Connection conn, int id);

    List<Operator> selectByManager(Connection conn, int ManagerId);

    List<Operator> selectAll(Connection conn);

    Operator SelectByName(Connection conn, String name);
}
